﻿//11.Write a program that finds the index of given element in a sorted array of integers
//by using the binary search algorithm (find it in Wikipedia).


using System;

class BinarySearch
{
    static void Main()
    {
        int numberN = int.Parse(Console.ReadLine());
        int key = int.Parse(Console.ReadLine());
        int[] arrayN = new int[numberN];
        for (int i = 0; i < arrayN.Length; i++)
        {
            arrayN[i] = int.Parse(Console.ReadLine());
        }
        Array.Sort(arrayN);
        int iMax = arrayN.Length - 1;
        int iMin = 0;
        BinariSirchAlgorithm(arrayN, key, iMax, iMin);
    }

    static int MidPoint(int iMax, int iMin)
    {
        int midpoint = (iMax + iMin)/2;
        return midpoint;
    }

    static void BinariSirchAlgorithm(int[] arrayN, int key, int iMax, int iMin)
    {
        while (iMax >= iMin)
        {
            int mid = MidPoint(iMax, iMin);
            if (arrayN[mid] > key)
            {
                iMax = mid - 1;
            }
            else if (arrayN[mid] < key)
            {
                iMin = mid + 1;
            }
            else
            {
                Console.WriteLine(mid);
                return;
            }
        }
        Console.WriteLine("No such element");
    }
}
